<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  {% load static %}
  <link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}">
  <title>首页</title>
</head>
<body>
{#{% if not question_list %}#}
{#    <p>问题列表为空</p>#}
{#  {% endif %}#}
<ul>
  {% for q in question_list %}
    <li>
{#      <a href="/polls/{{ q.id }}">#}
      <a href="{% url 'polls:detail' q.id %}">
     问题：{{ q.question_text }}  发布时间：{{ q.pub_date }}</a>
    </li>
    {% empty %}
    <li>问题列表为空</li>
    {% endfor %}
</ul>
</body>
</html>